package users;

public class UnknownUser extends User{
	public UnknownUser(){}
	public UnknownUser(User u)
	{
		setID(u.getID());
		setUsername(u.getUsername());
		setPassword(u.getPassword());
		setTypeOfUser(u.getTypeOfUser());
	}
	public UnknownUser(String ID, String username, String password, String type)
	{
		setID(ID);
		setUsername(username);
		setPassword(password);
		setTypeOfUser(type);
	}
	/**
	 * 
	 * @return The type of user that tries to login
	 */
	public User returnTypeOfUser(){
		if(getTypeOfUser().equalsIgnoreCase("Teacher"))
			return new Instructor(getID(),getUsername(),getPassword());
		else if(getTypeOfUser().equalsIgnoreCase("Student"))
			return new Student(getID(),getUsername(),getPassword());
		else return null;
	}
}
